The present invention relates to reading of data from optical media, and more particularly to a header search in reading data from optical media.
When directed to read data from an optical medium, such as a Compact Disc (CD) or Digital Video Disc (DVD), by an optical drive controller, the mechanical servo moves over the medium to the track of the target sector, and begins reading. The controller determines if the servo is at the correct location by using the identifying information in the headers of the read sectors. The controller searches for the target sector header. Once the target sector header is found and validated, buffering of the data begins. However, if the target sector header is damaged during demodulation, then the target sector cannot be identified. Once the controller identifies a sector subsequent to the target sector, it realizes that the servo has passed the target sector, and the header search is redone. Each time the controller redoes the header search, valuable time is wasted.
One conventional method of improving the header search is to search for the header of the sector immediately before the target sector header. If the controller locates the sector immediately before, it counts one sector and begins buffering at that sector. Thus, even if the target sector header is damaged, buffering still begins at the target sector. If the header of the sector immediately before is damaged, the controller can still find the undamaged target sector header and begin buffering, thus decreasing the times the controller must redo the header search. However, a problem still exists if the headers of both the target sector and the sector immediately before are damaged.
Accordingly, there exists a need for an improved method and system for validating a header search in reading data from an optical medium. The improved method and system should be easy to implement and further decrease the times the controller must redo the header search. The present invention addresses such a need.
The present invention provides a method and system for providing a header search in a data read from an optical medium. The method includes opening a search window with a size greater than one sector; finding at least one valid header within the search window; and locating a target sector based upon the at least one valid header. The size of the window is programmable. Optionally, more than one valid header can be required to be found before they are used as the reference, for the purpose of increasing the reliability of the reference. The number of required valid headers is also programmable. Buffering of the data then begins at the target sector found based on the reference. The header of this target sector is then checked for validity. If the header is not the target, then the header search may be restarted without the need to redo the data read. The header search scheme is applicable for multiple optical data formats. By using a search window of a programmable size and the power of ECC correction in the header search, the reliability of the search is significantly increased, the amount of reading redo is decreased, the throughput of the data is improved, and the same logic may be used for multiple data formats without intervention from the controller""s firmware. This scheme provides an additional ability to continually validate the headers of the buffered data. This additional feature increases the reliability of the read data and saves time.